<template>
  <div id="app">
    <el-container>
      <el-header class="top-theme" :style="{height: topHeight + 'px',lineHeight: topHeight + 'px'}">
        <top-nav/>
      </el-header>
      <el-container>
        <el-aside class="left-theme" :style="{height: height + 'px',width: '250px'}">
          <left-nav/>
        </el-aside>
        <el-main>
          <div :style="{height:(height-topHeight) + 'px',overflowY: 'auto'}">
            <router-view/>
          </div>
        </el-main>
      </el-container>
    </el-container>
    <Footer style="margin-top: -30px;"/>
  </div>
</template>

<script>
import LeftNav from "@/components/common/LeftNav.vue";
import TopNav from "@/components/common/TopNav.vue";
import Footer from "@/components/common/Footer.vue";

export default {
  name: "App",
  components: {TopNav, LeftNav,Footer},
  data(){
    return{
      height: 10,
      topHeight: 60
    }
  },
  mounted() {
    // 获取屏幕的高度
    this.height = window.innerHeight - this.topHeight
  }
};
</script>

<style scoped>
/**
.el-header, .el-footer {
  background-color: #161718;
  color: #FFFFFF;
  text-align: center;
}

.el-aside {
  background-color: #161711;
  color: #FFFFFF;
  text-align: center;
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
**/

</style>
